<?php /* Smarty version 3.1.27, created on 2017-04-19 18:26:51
         compiled from "E:\phpStudy\WWW\address\myweb\MobilePark\templates\register.html" */ ?>
<?php
/*%%SmartyHeaderCode:1511958f73b6b2250d9_96167090%%*/
if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '1995b3efa03c93625a4ae08a7b04fe5dccc42e23' => 
    array (
      0 => 'E:\\phpStudy\\WWW\\address\\myweb\\MobilePark\\templates\\register.html',
      1 => 1492597408,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '1511958f73b6b2250d9_96167090',
  'has_nocache_code' => false,
  'version' => '3.1.27',
  'unifunc' => 'content_58f73b6b2fbe80_28713643',
),false);
/*/%%SmartyHeaderCode%%*/
if ($_valid && !is_callable('content_58f73b6b2fbe80_28713643')) {
function content_58f73b6b2fbe80_28713643 ($_smarty_tpl) {

$_smarty_tpl->properties['nocache_hash'] = '1511958f73b6b2250d9_96167090';
?>
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>用户注册</title>
    <link rel="stylesheet" href="./static/css/css_login.css" />
    <link rel="stylesheet" href="./static/css/iconfont_login.css">
    <!--[if IE 7]><link rel="stylesheet" href="static/css/fontello-ie7_1.css"><![endif]-->
    <link rel="stylesheet" type="text/css" href="./static/css/jquery.fancybox_1.css" media="screen" />
    <link rel="stylesheet" href="./static/css/wuxie_1.css" />
    <meta content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport">
    <style>
        .login_logo {
            background: #5dccff;
            height: 100px;
            width: 100%;
            position: relative;
        }

            .login_logo img {
                border-radius: 100%;
                width: 90px;
                left: 50%;
                top: 50px;
                margin: 0 0 0 -48px;
                display: block;
                position: absolute;
                border: 3px solid rgba(255,255,255,0.3);
            }

        .login_main {
            margin-top: 45px;
        }

        .login_val li {
            margin-bottom: 15px;
            padding: 0 10px;
            margin-left: -10px;
        }

        .login_val .txt {
            border: 1px solid #ddd;
            position: relative;
            height: 40px;
            line-height: 40px;
            width: 100%;
            padding-left: 8px;
        }

        .login_val .flx .txt {
            width: 70%;
        }

        .login_val .flx .btn {
            width: 27%;
            font-size: 12px;
            height: 42px;
            border-radius: 3px;
            margin-right: -10px;
            background: #ff9100;
        }

            .login_val .flx .btn:active {
                background: #f90;
            }

        .login_btn .btn {
            margin-top:20px;
            width: 100%;
            height: 42px;
            border-radius: 3px;
        }

        .login_btn .btn:active {
            background: #16abef;
        }
        .login_btn .register{
            margin-top: 20px;
            display: block;
            width: 100%;
            color: #fff;
            line-height: 42px;
            height: 42px;
            border-radius: 3px;
        }
        .g6{
            text-align: center;
            font-size: 20px;
        }
    </style>
</head>
<body class="mb10">
    <div class="login_logo">
        <img src="./static/images/male_180.png" width="90" height="90">
    </div>
    <form action="register.php" method="post" novalidate="novalidate">
        <input name="__RequestVerificationToken" type="hidden" value="AUbFIiFcZ_vjYQha5T_uv91hKsXI4kH3bokHu1uOZA7Rd3QVivHXM3ZlfrH-0RDrcE0Xhq5gaE4kEa-XyRw-O9gqqxUvux0C02WXf-bOi6k1">   
    <div class="login_main pd15">
        <div class="login_tit f12 g6">手机号注册
            <span class="field-validation-valid" data-valmsg-for="UserName" data-valmsg-replace="true"></span>
        </div>
        <ul class="login_val mt10">
            <li class="login_phone">
                <input type="text" name="user_phone" id="UserName" class="txt" placeholder="请输入手机号" maxlength="11">
            </li>
            <li class="login_phone">
                <input type="password" name="user_pw" id="Password" class="txt lt" placeholder="请输入密码" maxlength="6">
            </li>
        </ul>
        <div class="login_btn">
            <input type="button" class="btn" value="注册" id="Button">
        </div>
    </div>
</form>    
<?php echo '<script'; ?>
 src="./static/js/jquery-1.6.2.min.js" type="text/javascript"><?php echo '</script'; ?>
>
<?php echo '<script'; ?>
 type="text/javascript" src="./static/js/jquery.validate.min.js"><?php echo '</script'; ?>
>
<?php echo '<script'; ?>
 type="text/javascript" src="./static/js/jquery.validate.unobtrusive.min.js"><?php echo '</script'; ?>
>

<?php echo '<script'; ?>
>
    String.prototype.IsMobile = function () {
        return /^1[3,4,5,7,8][0-9]/.test(this);
    }
    var timer;
    var secs = 60;
    function Timer() {
        secs--;
        $("#Button1").val(secs + "秒后重送");
        if (secs == 0) {
            secs = 60;
            window.clearInterval(timer);//清楚定时任务
            $("#Button1").attr("disabled", false);
            $("#Button1").val("获取验证码");
        }
    }

    $(document).ready(function () {

        $("#UserName").bind("blur", function () {
            if ($(this).val() == "") {
                $(".login_error").html("请输入登录账号");
            } else {
                $(".login_error").html("");
            }
        });
        $("#Password").bind("blur", function () {
            if ($(this).val() == "") {
                $(".login_error").html("请输入密码");
            } else {
                $(".login_error").html("");
            }
        });
        $("#Button1").bind("click", function () {
            if ($("#UserName").val() == "") {
                alert("请输入手机号码");
                $("#UserName").focus();
                return false;
            }
            if (!$("#UserName").val().IsMobile()) {
                alert("请输入正确手机号码");
                $("#UserName").focus();
                return false;
            }
            $("#Button1").attr("disabled", true).val("获取中...");

            $.ajax({
                type: 'post',
                url: 'SendMobilePassword',
                data: 'Mobile=' + $("#UserName").val(),
                timeout: 60000,
                success: function (res) {
                    if (res.Success) {
                        timer = window.setInterval("Timer()", 1000);//启用定时倒计
                    } else {
                        $("#Button1").attr("disabled", false).val("获取验证码");
                    }
                    alert(res.ErrorMessages);
                },
                error: function () {
                    $("#Button1").attr("disabled", false).val("获取验证码");
                    alert('连接服务器错误，请稍后再试！');
                }
            });
        });
        $("#Button").bind("click", function () {
            if ($("#UserName").val() == "") {
                alert("请输入手机号码");
                $("#UserName").focus();
                return false;
            }
            if (!$("#UserName").val().IsMobile()) {
                alert("请输入正确手机号码");
                $("#UserName").focus();
                return false;
            }
            $("#Button").val("注册中...").unbind("click");
            $("form").submit();
        });
    });
<?php echo '</script'; ?>
>


</body>
</html><?php }
}
?>